//
//  RegisterSuccessedViewController.m
//  TourTreasure
//
//  Created by LHF on 2017/5/17.
//  Copyright © 2017年 YiWang. All rights reserved.
//

#import "RegisterSuccessedViewController.h"
#import "LoginViewController.h"

@interface RegisterSuccessedViewController ()

@end

@implementation RegisterSuccessedViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self updateNav];
    [self createView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)updateNav
{
//    [self.navigateBar.leftBtn setHidden:NO];
//    
//    [self.navigateBar.bgImageView setBackgroundColor:[UIColor whiteColor]];
    //    [self.navigateBar.backImg setImage:[UIImage imageNamed:@"left_arrow_blue"]];
    [self setTitle:@"注册成功"];
//    self.navigateBar.titleLabel.text = @"注册成功";
//    self.navigateBar.titleLabel.textColor = RGBCOLOR(51, 51, 51);
//    
//    self.navigateBar.titleLabel.whc_CenterX(0).whc_Height(44).whc_TopSpace(20);
//    [self.navigateBar.lineImageView setHidden:NO];
}

-(void)createView
{
    UIView *mainView = [[UIView alloc] initWithFrame:CGRectMake(0, 64, __kScreenWidth, __kScreenHeight - 64)];
    [mainView setBackgroundColor:[UIColor whiteColor]];
    [self.view addSubview:mainView];
    
    UIImageView *img = [UIImageView new];
    [img setImage:[UIImage imageNamed:@"register_successed"]];
    [mainView addSubview:img];
    img.whc_CenterX(0).whc_TopSpace(90 * ADPT);
    
    UILabel *label = [UILabel new];
    label.textColor = HGColor(51, 51, 51);
    label.font = HTFont(30 * ADPT);
    label.text  = @"恭喜你注册成功！";
    [mainView addSubview:label];
    
    UIButton *btn = [UIButton new];
    [btn setTitle:@"前去填写资料" forState:UIControlStateNormal];
    [btn setBackgroundColor:HGColor(255, 137, 16)];
    btn.titleLabel.font = HTFont(36 * ADPT);
    [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [mainView addSubview:btn];
    [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
    
    [BaseViewController getRoundIcon:btn borderWidth:0 borderColor:[UIColor clearColor] cornerRadius:10 * ADPT];
    
    label.whc_CenterX(0).whc_TopSpaceToView(45 * ADPT,img);
    btn.whc_Width(690 * ADPT).whc_Height(100 * ADPT).whc_TopSpaceToView(117 * ADPT,label).whc_CenterX(0);
    
}

-(void)navLeftButtonClick:(id)sender
{
    for (id vc in self.navigationController.viewControllers) {
        if ([vc isKindOfClass:[LoginViewController class]]) {
            [self.navigationController pushViewController:vc animated:YES];
        }
    }
}

-(void)btnClick:(id)sender
{
//    LAddUserInfoViewController *next = [[LAddUserInfoViewController alloc] init];
//    [self.navigationController pushViewController:next animated:YES];
}


@end
